﻿Public Class ActionItemsEditViewDialog

    Private Sub ActionItemsEditViewDialog_Closing(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
        Me.ActionItemsBindingSource.EndEdit()
    End Sub

    Private Sub ActionItemsEditViewDialog_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
        StatusBindingSource.DataSource = frmMain.DsActionItems
        PrivacyBindingSource.DataSource = frmMain.DsActionItems
        CatagoryBindingSource.DataSource = frmMain.DsActionItems

        'Catagories
        'frmMain.DsActionItems.Catagories.DefaultView.RowFilter = "Deleted =0"
        chklstCatagories.dtParentTable = frmMain.DsActionItems.ActionItems
        chklstCatagories.dtChildTable = frmMain.DsActionItems.Catagories
        chklstCatagories.dtRelationDataSource = frmMain.DsActionItems.Item_Catagory
        chklstCatagories.DisplayMember = "Catagory"
        chklstCatagories.ValueMember = "CatagoryID"
        chklstCatagories.ParentIDMember = "ItemID"
        chklstCatagories.ChildIDMember = "CatagoryID"
        chklstCatagories.SelectedParentID = ItemIDTextBox.Text
        chklstCatagories.BindData()

        'Persons
        'frmMain.DsActionItems.Person.DefaultView.RowFilter = "Deleted =0"
        chklstPerson.dtParentTable = frmMain.DsActionItems.ActionItems
        chklstPerson.dtChildTable = frmMain.DsActionItems.Person
        chklstPerson.dtRelationDataSource = frmMain.DsActionItems.Person_Item
        chklstPerson.DisplayMember = "PersonName"
        chklstPerson.ValueMember = "PersonID"
        chklstPerson.ParentIDMember = "ItemID"
        chklstPerson.ChildIDMember = "PersonID"
        chklstPerson.SelectedParentID = ItemIDTextBox.Text
        chklstPerson.BindData()


    End Sub

    Private Sub comStatus_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles comStatus.SelectedIndexChanged

    End Sub
End Class